package com.example.mq.mqclient;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: WHY
 * Date: 2023-09-08
 * Time: 13:33
 */


import java.io.IOException;

/**
 * 持有服务器的地址
 */
public class ConnectionFactory {
    public String getHost() {
        return host;
    }

    public void setHost(String host) {
        this.host = host;
    }

    public int getPort() {
        return port;
    }

    public void setPort(int port) {
        this.port = port;
    }

    //brokerServer的IP地址
    private String host;
    //brokerserver的端口号
    private int port;



    public Connection newConnection() throws IOException {
        Connection connection=new Connection(host,port);
        return connection;
    }
    //扩展项
//    private String virtualHost;
//    private String username;
//    private String password;
}
